{% extends 'admin/layout.html' %}
{% import 'admin/paginationer.html' as paginationer %}
{% block stylesheets %}
{% endblock %}

{% block page_head %}
    <!-- page head start-->
    <div class="page-head">
        <h3 class="m-b-less">
            人事列表
        </h3>
        <!--<span class="sub-title">Welcome to Static Table</span>-->
        <div class="state-information">
            <ol class="breadcrumb m-b-less bg-less">
                <li><a href="#">首页</a></li>
                <li><a href="#">人事管理</a></li>
                <li class="active">人事列表</li>
            </ol>
        </div>
    </div>
    <!-- page head end-->
{% endblock %}

{% block main_content %}
    <div class="wrapper">
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading head-border">
                        <div class="row">
                            <label class="col-md-10"> 员工列表</label>
                            <div class="col-md-2">
                                <a href="{{ url_for('admin.emp_edit',id=0) }}" class="btn btn-primary">+ 新增</a></div>
                        </div>
                    </header>

                    <table class="table table-striped custom-table table-hover">
                        <thead>
                        <tr>
                            <th><i class="fa fa-bookmark-o"></i> 编号</th>
                            <th class="hidden-xs"><i class="fa fa-building-o"></i> 姓名</th>
                            <th><i class="fa fa-bar-chart-o"></i> 性别</th>
                            <th><i class="fa fa-line-chart"></i> 生日</th>
                            <th>工作</th>
                            <th>工资</th>
                            <th><i class=" fa fa-edit"></i> 地址</th>
                            <th class="hidden-xs"><i class="fa fa-cogs"></i> 操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for item in pagination.items %}
                            <tr>
                                <td><a href="#">{{ item.id }}</a></td>
                                <td class="hidden-xs">{{ item.name }}</td>
                                <td>{{ item.gender }}</td>
                                <td>{{ item.birthdate }}</td>
                                <td>{{ item.job }}</td>
                                <td>{{ item.salary }}</td>
                                <td><span class="label label-info label-mini">{{ item.address }}</span></td>
                                <td class="hidden-xs">
                                    <button class="btn btn-success btn-xs"><i class="fa fa-check"></i></button>
                                    <a href="{{ url_for('.emp_edit',id=item.id) }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></a>
                                    <a href="{{ url_for('admin.emp_del',id=item.id) }}" class="btn btn-danger btn-xs"><i class="fa fa-trash-o "></i></a>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>

{#分页导航 开始注意 import引入 #}
 {{ paginationer.render_pagination(pagination,'.emp_list') }}

                </section>
            </div>
        </div>
    </div>

{% endblock %}

{% block scritps %}
{% endblock %}